@font-face {
  font-family: Ionicons;
  src: url(https://file.iviewui.com/dist/d535a25a79fb1365ae814b61e88fae71.ttf) format("truetype"), url(https://file.iviewui.com/dist/99ac3308dd8ee14f749f51538d0d5b9e.woff) format("woff"), url(https://file.iviewui.com/dist/a2c4a261a239aa84463dc70e4bac9b9a.svg#Ionicons) format("svg");
  font-weight: 400;
  font-style: normal
}

@keyframes ani-demo-spin {
  from {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.msg-item {
  padding:1px 0;
  .msg {
    &.tips {
      text-align: center;
      user-select: none;
      span {
        background: #dadada;
        color: #ffffff;
        padding: 4px 8px 3px;
        border-radius: 3px;
        .red {
          color: red;
          font-weight: 400;
        }
      }
    }
    &.mpnews {
      margin: 30px 0;
      .news_item {
        width: 300px;
        margin: 0 auto;
        cursor: pointer;
        user-select: none;
        background: #fff;
        font-size: 0;
        padding: 10px;
        // border-bottom: 1px solid #000;
        position: relative;
        &::after {
          content: "";
          display: block;
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
        }
        &:hover {
          opacity: 0.8;
        }
        img {
          width: 35px;
          height: 35px;
          border-radius: 5px;
        }
        .tit {
          width: calc(100% - 45px);
          float: right;
          line-height: 35px;
          height: 35px;
          margin: 0;
          font-size: 14px;
        }
        &.after {
          border-bottom: none;
        }
        &.first {
          background: #ffffff;
          box-shadow: 0 0 10px #aaa;
          padding: 0;
          border-radius: 4px 4px 0 0;
          .top1 {
            width: 100%;
            position: relative;
            font-size: 0px;
            img {
              width: 100%;
              height: auto;
              border-radius: 4px 4px 0 0;
            }
            p {
              position: absolute;
              font-size: 16px;
              background: rgba(0, 0, 0, 0.5);
              color: #fff;
              bottom: 0;
              left: 0;
              margin: 0;
              width: 100%;
              padding: 10px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }
          }
          .desc {
            font-size: 16px;
            height: 40px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #5d5d5d;
            line-height: 40px;
            padding: 0 10px;
          }
        }
      }
    }
    margin: 10px;
    .header {
      user-select: none;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      float: left;
      b {
        display: block;
        width: 100%;
        height: 100%;
        background-size: 100% 100% !important;
        border-radius: 50%;
      }
    }
    &[send-type='1002'] {
      .header {
        float: right;
      }
      .cont {
        float: right;
        .info {
          .name {
            float: right;
            margin-left: 5px;
          }
          .time {
            float: right;
          }
        }
        .content {
          background:#c1e1fc;
          float: right;
          &::before {
            right: auto;
            left: -25px;
          }
          &::after {
            left: auto;
            right: -8px;
            transform: rotate(-15deg);
            border-color: #c1e1fc transparent transparent #c1e1fc;
          }
        }
      }
    }
    .cont {
      width: calc(100% - 150px);
      float: left;
      .info {
        padding: 0px 5px 0;
        user-select: none;
        .name {
          float: left;
          margin-right: 5px;
          color: #666;
        }
        .time {
          float: left;
          color: #bbb;
        }
        &::after {
          content: "";
          display: block;
          clear: both;
        }
      }
      .content {
        float: left;
        position: relative;
        min-width: 40px;
        background: #e6e6e6;
        margin: 5px 10px;
        min-height: 40px;
        padding: 10px 10px;
        user-select: text;
        border-radius: 5px;
        &::before {
          content: "";
          font-size: 16px;
          width: 20px;
          height: 20px;
          text-align: center;
          line-height: 20px;
          border-radius: 50%;
          display: block;
          position: absolute;
          font-family: Ionicons;
          top: calc(50% - 10px);
          right: -25px;
          transform-origin: 10px 11px;
        }
        &[status="2"]::before {
          content: "↻";
          animation: ani-demo-spin 1s linear infinite;
        }
        &[status="0"]::before {
          content: "\F333";
          color: red;
        }
        &::after {
          content: "";
          display: block;
          width: 0;
          height: 0;
          border: 10px solid #e6e6e6;
          border-width: 5px 10px;
          border-color: #e6e6e6 #e6e6e6 transparent transparent;
          position: absolute;
          top: 0;
          left: -8px;
          transform: rotate(15deg);
          border-radius: 5px 0 0 0;
        }
        &[type="text"] {
          font-size: 16px;
          line-height: 20px;
          color: #333;
          white-space: pre-wrap;
          word-break: break-all;
        }
        &[type="image"] {
          font-size: 0;
          padding: 2px;
          img {
            position: relative;
            z-index: 1;
            border-radius: 3px;
            max-width: 100px;
            min-height: 40px;
            max-height: 100px;
            cursor: pointer;
            &:active {
              opacity: 0.9;
            }
          }
        }
        &[type="voice"] {
          width: 70px;
          cursor: pointer;
          &:active {
            opacity: 0.7;
          }
          .voice {
            text-align: right;
            i {
              &.play {
                // animation: fade-in-out 0.5s linear infinite;
              }
              transform: rotate(45deg);
              font-size: 20px;
              color: #777;
            }
            &[type="1002"] {
              text-align: left;
              i {
                transform: rotate(-135deg);
              }
            }
          }
        }
        &[type="video"] {
          padding: 2px;
          .video {
            position: relative;
            z-index: 2;
            border-radius: 5px;
            font-size: 0;
            img {
              max-width: 150px;
              max-height: 200px;
            }
            .play {
              font-size: 30px;
              position: absolute;
              top: 0;
              left: 0;
              width: 100%;
              height: 100%;
              background: rgba(0, 0, 0, 0.3);
              cursor: pointer;
              display: flex;
              justify-content: center;
              align-items: center;
              i {
                color: #fff;
                width: 44px;
                height: 44px;
                border: 2px solid #fff;
                border-radius: 50%;
                text-align: center;
                line-height: 40px;
              }
            }
          }
        }
      }
    }
    &::after {
      content: "";
      display: block;
      clear: both;
    }
  }
}